<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class StockSetting extends BaseModel
{
    protected $name = 'stock_setting';

    public function setAutoCollectTimeAttr($value): bool|string
    {
        return json_encode($value, 320);
    }

    public function getAutoCollectTimeAttr($value)
    {
        return $value ? json_decode($value, true) : [];
    }
}
